<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
	window.top.$('#display_center_id').css('display','none');
</script>
<div class="subnav">
	<div class="content-menu ib-a blue line-x" style="">
		<a href="javascript:history.go(-1);" class="button"><em style="color:blue;font-weight:bolder;">返回上一级</em></a>
	</div>
</div>
<div class="pad-lr-10">
<form name="myform" action="?m=poll&c=poll&a=delInfo" method="post" onsubmit="return confirm('<?php echo L('poll_info_delete')?>')">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th  align="center" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
			<th align="center" width="60">ID</th>
			<th align="center" width="40"><?php echo L('poll_info_myorder')?></th>
			<th align="center" width="200"><?php echo L('poll_info_title')?></th>
			<th align="center" width="100"><?php echo L('poll_info_titlepic')?></th>
			<th align="center" width="100"><?php echo L('poll_info_titleurl')?></th>
			<th align="center"><?php echo L('addusername')?></th>
			<th align="center"><?php echo L('poll_istop')?></th>
			<th align="center" width="100"><?php echo L('operation')?></th>
		</tr>
	</thead>
<tbody>
<?php
	foreach($poll_list as $k=>$v) {
?>
    <tr>
		<td align="center" ><input type="checkbox" value="<?php echo $v['id']?>" name="id[]"></td>
		<td align="center" ><?php echo $v['id']?></td>
		<td align="center" ><?php echo $v['myorder']?></td>
		<td align="center" ><?php echo $v['title']?></td>
		<td align="center" ><img src="<?php echo $v['titlepic']?>" height="80"></td>
		<td align="center" width="100" title="<?php echo $v['titleurl'];?>"><?php echo str_cut($v['titleurl'], 50,'...');?></td>
		<td align="center"><?php echo $v['addusername']?></td>
		<td align="center"><?php if($v['istop'] == 1) { echo '是';}else{ echo '否';}?></td>
		<td align="center" width="100">
			<a href="javascript:;" onclick="edit(<?php echo $v['id']?>, '<?php echo new_addslashes(new_html_special_chars($v['title']))?>')"
			title="<?php echo L('edit')?>"><?php echo L('edit')?></a> |
			<a href="?m=poll&c=poll&a=delInfo&id=<?php echo $v['id']?>&title=<?php echo $v['title'];?>" onClick="return confirm('确认要删除[<?php echo $v['title']?>]？')"><?php echo L('delete')?></a>
		</td>
    </tr>
<?php
	}

?>
</tbody>
</table>

<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>"/>
<!-- <input type="button" class="button" value="--><?php //echo L('import_collection_points')?><!--" onclick="import_spider()" />-->
</div>

<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
<script type="text/javascript">
	function edit(id, name) {
		window.top.art.dialog({id:'edit'}).close();
		window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=poll&c=poll&a=editInfo&id='+id,width:'700',height:'350'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
	}
</script>
</body>
</html>